An electronic device (such as a notebook computer, personal digital assistant, media player, etc.) typically has two alternative power sources: an external power source and an internal battery. The external power source is typically in the form of an AC-DC adapter that plugs into an AC outlet and converts an AC voltage to a DC voltage. When the AC-DC adapter is unplugged from the AC outlet or not connected to the electronic device, power to the electronic device is provided by the battery if the battery has sufficient charge.